BeBench 0.5       									Feb. 20th 1997

BeBench is my graphics benchmark for the BeOS. I felt the need for something
like this in some discussions in comp.sys.be and BeDevtalk, so i decided to 
write something like this. The first graphic benchmark i found was not satisfying 
because on a faster machine the tests run so fast that the measurement time was 
to short to get reliable results. The graphics benchmarks in BeBench were taken 
from Sysbench from OS/2 and adapted to BeOS. Every single benchmark runs at least 
10 seconds using a self adjusting test loop, so a greater reliability in the 
results is guaranteed. Since BeOS is a multitasking and multithreading system, 
results will vary on different runs due to system activity. Also results are highly
dependant from the current resolution, as tests have shown. Comparable results are
only possible using the same resolution and refresh rate.

A word about benchmarks
=======================

One statement: Don't believe any benchmark. 

Benchmarks are a good way for the industry to show the advantages of one system
against another, but there are many ways one can cheat using benchmarks or 
interpreting the results. So don't make any decisions buying hardware dependent
from benchmark results. But despite their shortcomings benchmarks are sometimes
a good tool for comparing specific parts of a machine if you can be sure that the
conditions under which the benchmark was run are comparable. 

I like to include one line from the original OS/2 readme:

"Like all such benchmark programs, its results can be read in many ways. Beware of 
 making too many decisions based on its output - by their very nature, benchmark
 programs are *not* real world applications. By tuning your system with the aid of
 benchmarks, you may end up with a system that runs benchmark programs wonderfully
 well but runs applications badly! Just so you're aware...."


Using BeBench
=============

The File menu

Using the File menu you can save your benchmark results.You can either save the result
in a text file using "Save as..." or copy the result to the clipboard. Be aware: When saving
a result BeBench does curently not ask wether you wanna overwrite a file if the filename 
you have selected already exists.
As an alternative to saving the result you can select anything in the result window and drag
and drop it to any other application that accepts drag&drop from a BTextView.

The graphics tests

The graphics benchmarks were the first benchmarks implemented in BeBench. 
BeBench runs every graphic benchmark in it's own window in a separate thread. 
You can run even different benchmarks at the same time, but this will lead to 
unreliable results. 
The benchmark window has a fixed size of 600x400 pixels which is completely
or partially used in every benchmark. BeBench has 11 different graphics test, from 
different bitblits up to line arrays. You can start every benchmark by simply selecting 
it from the menu. After the benchmark is finished, the result in the main view is 
updated.

Bitblit S->S copy
	This benchmark copies a rectangle from the screen to another location on
	the screen. The rectangle copied is 303 pixels wide and high so no word
	or long boundary optimization of the graphics driver will affect the result.

BitBlit M->S copy
	This benchmarks copies a rectangle from the memory to the screen. This is 
	done using a BBitmap and drawing it with DrawBitmap. The bitmap has the
	same size as the rectangles copied in the first Bitblit benchmark. Because there 
	is no graphic driver hook for this function the performance is mainly influenced
	by the machine power.

Filled Rect
	This benchmarks fills a rectangle in the window with a solid color. The color is cycled 
	so you can see a change. The position of the filled rectangle is cycled through
	256 precalculated randomly choosen points so that no optimizations due to the position 
	or width of the fill area could take place.

Pattern Fill
	This fills a rectangle in the window with a dotted pattern (B_MIXED_COLORS). 
	The same color and position cycling as in Filled Rect is used. Like the memory 
	to screen bitblit there is no accelerated function for this in the graphics 
	driver so this is basically the speed of the app_server writing to the graphics
	card memory. 
	

Vertical Lines
	This draws a vertical line in the center of the window using StrokeLine.

Horizontal Lines
	This draws a horizontal line in the center of the window using StrokeLine.

Diagonal Lines
	This draws a diagonal line in the center of the window using StrokeLine.

Vertical Line Array
	This draws vertical lines using the line arrays on the whole window. 
	Every array consists of t a full window of lines.

Horizontal Line Array
	This draws horizontal  lines using the line arrays on the whole window. 
	Every array consists of t a full window of lines.

Diagonal Line Array
	This draws diagonal lines using the line arrays on the whole window.

Text Render
	This draws a text string on changing positions in the window. The font 
	used is Emily in 12 pt. For comparability of results there is no way to 
	change this font or the size (ok, you can patch it, if you like).

The last result is a total value given in the totally meaningless unit called Be-Marks. 
This value is calculated using the weighted results from all graphics benchmarks together.
So this value is only valid if all tests were run, even if it is calculated after every single
benchmark. 
If i will change the measurement or the weighting factors for one benchmark i will 
document this.

The WindowScreen tests

The WindowScreen tests run some of the graphics test on a 640x480 window screen using
the direct graphic card hooks. The tests are the same as in the graphics section, so i 
spare you and me the further explanation. The bit depth of the window screen is the same
as used in the screen where BeBench is running. 
The window screen tests don't use multiple threads yet. The benchmark runs completely in
the main thread, and due to this it is impossible to cancel the tests. You can only use the 
killer key combination from the Be Users Guide for BWindowScreen programs.

Since not all graphic hooks must be implemented from a graphic card driver BeBench tests 
at the beginning of a run if a hook is installed. If not, instead of a result 
a "not supported" will be displayed in the result window.
These test will not be used in the calculation of the BeMarks for the WindowScreen. For this 
reason BeBench uses dynamic weighting of the WindowScreen results using only the 
available results.


Future
======

BeBench will probably be extended to a full range of benchmarking tests including
memory and disk-i/o marks (sysbench for OS/2 has a lot of tests in it). But because
some performance marks are mostly designed for single processor machines these
results would not be a reasonable good comparision base for comparing different 
machines. The HINT benchmark which is already available for the BeOS is a much
better approach for system performance regarding CPU and memory speed. 

If i find a method to get information about the gfx card used i will include this in 
the benchmark results.

Probably i will rewrite this readme file ;-)

Cheating
========

BeBench is not secure against cheating. The simplest way to cheat is to bring another
window to the front when a benchmark is running and cover the benchmark window
with the other window. Because the drawing engine has to draw a lot less pixels the 
results will normally much better. So all i can do to get comparable results is to hope
that nobody cheats using BeBench. Also you can do your tests on a 8bpp screen and then
move the results window to a 32bpp screen. Since the system information in the result
window shows the data of the current screen, you can easily cheat about the 32bpp 
performance this way.

Bugs
====

BeBench has no known severe bugs in it. But there are a few minor things which need
to be fixed or improved:

	- Moving the window to another workspace updates the machine and screen info,
	  but the results will not match this.
	- Saving a result to an existing file overwrites it without asking the user.

Acknowledgements
================

BeBench uses some routines from the OS/2 sysbench, maintained by Trevor Hemsley 
(Trevor-Hemsley@dial.pipex.com). All the other stuff and probably all the bugs are
completely from me, so don't hesitate to write your comments to me. Any email with 
comments will be welcome.

The source code to BeBench is available on request. Just ask, and you will get it.

Dirk Steins
dsteins@ibm.net 

Disclaimer
==========

I hate this stuff, but it is necessary.

THIS SOFTWARE IS PROVIDED "AS IS". YOU ARE USING THIS SOFTWARE AT YOUR OWN RISK. 
THE AUTHOR (DIRK STEINS) IS NOT LIABLE FOR ANY DAMAGE CAUSED BY THE USE, NOT USE 
OR ABUSE OF BEBENCH OR BY THE INABILITY TO USE BEBENCH.  IF YOU ARE NOT SURE ABOUT 
THIS, OR IF YOU DON'T ACCEPT THIS, THEN DO NOT USE BEBENCH!

My results
==========

The following are the results for my machine running at 8bpp.


System info
   BeBench version       :         0.6, May  6 1997 
   CPU type              :         PPC 603e 
   CPU count             :         2 
   CPU clock speed       :         133    MHz
   Resolution            :         0 x 0 Pixel
   Bitdepth              :         32     bpp
   Refreshrate           :         60.00  Hz


 Graphics
   BitBlt S->S copy      :         23.048 MPixels/s 
   BitBlt M->S copy      :         15.627 MPixels/s
   Filled Rectangle      :         83.126 MPixels/s
   Pattern Fill          :         14.899 MPixels/s
   Vertical Lines        :          2.208 MPixels/s
   Horizontal Lines      :          3.156 MPixels/s
   Diagonal Lines        :          1.992 MPixels/s
   Vertical Line Array   :          5.705 MPixels/s
   Horizontal Line Array :          7.958 MPixels/s
   Diagonal Line Array   :          6.024 MPixels/s
   Text Render           :          4.036 MPixels/s
   ------------------------------------------------
   Total                 :         15.463 Be-Marks


 WindowScreen
   BitBlt S->S copy      :         45.385 MPixels/s 
   Filled Rectangle      :        136.984 MPixels/s
   Vertical Lines        :          9.547 MPixels/s
   Horizontal Lines      :         12.302 MPixels/s
   Diagonal Lines        :         10.363 MPixels/s
   Vertical Line Array   :         not supported
   Horizontal Line Array :         not supported
   Diagonal Line Array   :         not supported
   ------------------------------------------------
   Total                 :         46.415 Be-Marks


As you can see in this result, my (Be supplied) S3 driver
does not support direct line arrays using a BWindowScreen.
Hopefully your driver does something better.

The following are the results on my machine using a Matrox
Mystique with 4 MB and using the beta driver from Trey Boudreau
(i hope i did spell his name right). 



 System info
   BeBench version       :         0.6, May  6 1997 
   CPU type              :         PPC 603e 
   CPU count             :         2 
   CPU clock speed       :         133    MHz
   Resolution            :         1024 x 768 Pixel
   Bitdepth              :         8      bpp
   Refreshrate           :         75.00  Hz


 Graphics
   BitBlt S->S copy      :         84.112 MPixels/s 
   BitBlt M->S copy      :         15.754 MPixels/s
   Filled Rectangle      :        829.787 MPixels/s
   Pattern Fill          :         15.023 MPixels/s
   Vertical Lines        :          3.563 MPixels/s
   Horizontal Lines      :          5.961 MPixels/s
   Diagonal Lines        :          2.502 MPixels/s
   Vertical Line Array   :         13.711 MPixels/s
   Horizontal Line Array :         50.645 MPixels/s
   Diagonal Line Array   :         21.953 MPixels/s
   Text Render           :          4.025 MPixels/s
   ------------------------------------------------
   Total                 :         91.515 Be-Marks


 WindowScreen
   BitBlt S->S copy      :         --.--- MPixels/s 
   Filled Rectangle      :         --.--- MPixels/s
   Vertical Lines        :         --.--- MPixels/s
   Horizontal Lines      :         --.--- MPixels/s
   Diagonal Lines        :         --.--- MPixels/s
   Vertical Line Array   :         --.--- MPixels/s
   Horizontal Line Array :         --.--- MPixels/s
   Diagonal Line Array   :         --.--- MPixels/s
   ------------------------------------------------
   Total                 :         --.--- Be-Marks


This shows the advantage of the Mystique in the accelerated 
functions, especially the filled rectangle test. Since the 
Mystique driver does not yet support WindowScreens there are
no results in it for that.

History 

=======

- Version 0.1, 11.02.97
  first release to Trey Boudreau and Peter Urbanec

- Version 0.2, 12.02.97
  internal class reorganization
  made flushing and synching after all drawing operations consistent
  now after all operations Flush() is called (not Sync()).
  
- Version 0.3, 16.02.97
  added a Sync() after completion of each test
  added "Save result as" and "Copy"
  added menu for BWindowScreen 
  changed BeMarks calculation. This is now the final version of 
  this calculation, from this version on results will be comparable
  using different versions of BeBench. 

- Version 0.4, 18.02.97
  added BWindowScreen benchmarks. On my machine only 8 bpp is
  working ok, 32bpp gives strange results on the screen. Looks
  like an 8bit buffer used with 32bpp functions or an 32 bpp 
  buffer displayed using 8bpp.
  Included source in distribution. The source is not nice at 
  some places and will probably be rewritten, especially the 
  results storing and display.
  If someone wants to check the BWindowScreen benchmarks at 32bpp,
  please feel free to do so.

- Version 0.5, 20.02.97
  changed version number to 0.5 to meet announcement in BeWare.
  edited some parts of this readme file.
  first public release

- Version 0.6, 08.05.97
  fixed bug with 32bpp window screens. They now work perfectly (in fact,
  this bug was fixed during the europe DevCon but not published).
  Fixed bug in fill area speed calculation.
  changed RectFill and PatternFill to not use whole window but a moving
  rectangle in the window.  